﻿Module mdl_MoveStdMultiMachineService
    Function MoveStdMultiMachineService_Execute(ByVal inParam As InSiteWebService.InMoveStdMultiMachine, ByVal clientStr As String, ByVal isComplete As Boolean) As InSiteWebService.OutMoveStdMultiMachine

        Dim srvClient As New InSiteWebService.InSiteServiceSoapClient   'サービスクライアント
        Dim outParam As New InSiteWebService.OutMoveStdMultiMachine     '出力用ヘッダ

        inParam.Header = New InSiteWebService.InHeader                  '全サービス共通の入力用ヘッダ
        inParam.Header.User = INSITE_USER                               'ログインユーザ
        inParam.Header.Password = PASSWORD                              'ログインパスワード
        inParam.Header.Client = clientStr

        Try
            If isComplete Then
                outParam = srvClient.MoveStdMultiMachineService_Execute2(inParam)        'ロット完成(全件完成)
            Else
                outParam = srvClient.MoveStdMultiMachineService_Execute1(inParam)        'ロット完成(途中)
            End If
            Return outParam

        Catch ex As Exception
            outParam.Header = New InSiteWebService.OutHeader
            outParam.Header.Status = STS_ERROR
            outParam.Header.ResultMessage = New String() {ex.Message & " (" & ex.InnerException.Message & ")"}
            outParam.Header.ResultCode = New String() {"99999"}
            Return outParam

        Finally
            srvClient = Nothing
            outParam = Nothing

        End Try

    End Function
End Module
